<div id="ctn_inicial" class="conteudo">
    <?php 
    $link = '';
    $posicao = 0;
    foreach($this->fullbanner as $key => $banner){
        $img = glob('public/upload/fullbanner/'.$banner['BAN_ID'].'.*');
        @$img = $img[0];
        $style = '';
        $class = '';

        if($key > 0) $style = 'display: none;';
        if($key == 0) $class = 'class="action"';

        $alink .= '<a '.$class.' id="lnkb'.$key.'" itemref="bimg'.$key.'" itemid="'.$key.'" href="javascript:void(0)"></a>';
        $imgs .= '<img id="bimg'.$key.'" src="'.$this->urlbase.'/'.str_replace('.','_sld.',$img).'" style="margin-left: '.$posicao.'px" >';
        //$posicao += 34; 
        
        if(strlen($banner['BAN_LNK']) > 0)
    ?>
        <?php if(strlen($banner['BAN_LNK']) > 0) { ?>
        <a href="<?php echo $banner['BAN_LNK'];?>" class="g_pagina go_pag" pagina="<?php echo str_replace('#', '', $banner['BAN_LNK']);?>">
        <?php } ?>
            <div id="bnn_alt<?php echo $key; ?>" class="bnn_alt" style="<?php echo $style; ?>"><?php echo $banner['BAN_DSC']; ?></div>
            <div id="banner<?php echo $key; ?>" class="banner" style="background-image: url('<?php echo $this->urlbase.'/'.$img; ?>');<?php echo $style; ?>"></div>
        <?php if(strlen($banner['BAN_LNK']) > 0) { ?>
        </a>
        <?php } ?>
    <?php } ?>

    <div class="lnkitg">
        <div class="imgs"><?php echo $imgs; ?></div>
        <?php echo $alink; ?>
    </div>
</div>

<div id="ctn_lista_projetos" class="conteudo c_l_p_home">
    <ul class="c_lst_prt">
        <?php 
            foreach($this->ambientes as $key => $amb) { 
                $class = ($key % 2) == 0 ? 'b_v_right':'b_v_left';
                
                $img = glob('public/upload/ambientes/'.$amb['AMB_ID'].'_lst.*');
                
                $tilpag = strlen($amb['AMB_TILPAG']) ? $amb['AMB_TILPAG']:$amb['AMB_NOM'];
        ?>
             <li>
                 <a href="<?php echo $this->urlbase.'/ambientes/detalhe/id/'.$amb['AMB_ID']; ?>">
                     <div class="bar_vm <?php echo $class; ?>">
                         <span class="til"><?php echo $tilpag; ?></span>
                         <span class="txt"><?php echo $amb['AMB_DSC']; ?></span>
                     </div>
                     <?php if(isset($img[0])) { ?>
                     <img src="<?php echo $img[0]; ?>"/>
                     <?php } ?>
                 </a>
             </li>
        <?php } ?>
</div>

<div class="rodape-home">
    <div class="r_h_cnt">
        <ul class="l-menu">
        <?php foreach($this->sessao_paginasite as $pag) { ?>
            <li><a href="<?php echo $this->urlbase.'/'.$pag['PGS_LNK']; ?>"><?php echo $pag['PGS_NOM']; ?></a></li>
        <?php } ?>
        </ul>

        <ul class="l-menu">
        <?php foreach($this->sessao_ambientes as $amb) { ?>
            <li><a href="<?php echo $this->urlbase.'/ambientes/detalhe/id/'.$amb['AMB_ID']; ?>"><?php echo $amb['AMB_NOM']; ?></a></li>
        <?php } ?>
        </ul>

        <div class="cnt_logo_end">
            <a class="c_l_e_logo" href="<?php echo $this->urlbase.'/'; ?>"><img src="<?php echo $this->urlbase.'/public/media/images/logo_rp.png'; ?>"></a>
            <?php
                $pref = '54';
                $telefone = $this->parametros['PAR_TEL'];
                if(strlen($telefone) > 5){
                    $telefone = $this->parametros['PAR_TEL'];
                    $temp = explode(' ',$telefone);
                    $pref = $temp[0];
                    $telefone = $temp[1];
                    if(isset($temp[2]) && strlen($temp[2]) > 2) $telefone .= '.'.$temp[2];
                }
            ?>
            <div class="telefone"><span><?php echo $pref; ?></span> <?php echo $telefone; ?></div>
            <?php if(strlen($this->parametros['PAR_FAC']) > 5) {?>
            <a href="<?php echo $this->parametros['PAR_FAC']; ?>" target="_blank"><img src="<?php echo $this->urlbase.'/public/media/images/facebook.png'; ?>" alt="facebook"></a>
            <?php } ?>
        </div>
    </div>
</div>
<div class="bar-bottom"></div>

